﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Messaging;
using System.Text;
using System.Threading.Tasks;
using Toolbox;

namespace FremtidensPlejehjem_Infoskærm.Messaging
{
    public class Producer
    {
        MessageQueue _channel;

        public Producer(MessageQueue channel)
        {
            _channel = channel;
        }

        public void SendMessage(object message)
        {
            string xmlMessage = GeneralTools.SerializeMessage(message);

            _channel.Send(xmlMessage);
        }
    }
}
